import Vue from "vue";
import VueRouter from "vue-router";

const Login = () => import('../views/login/Login.vue');
const Home = () => import('../views/home/Home.vue');
const Profile = () => import('../views/profile/Profile.vue');
const Register = () => import('../views/register/Register.vue');
const Discover = () => import('../views/discover/Discover.vue');
const Search = () => import('../views/discover/Search.vue');
const SearchResult = () => import('../views/discover/SearchResult.vue');
const Chat = () => import('../views/chat/Chat.vue');
const Contact = () => import('../views/contact/Contact.vue');

Vue.use(VueRouter);
const routes = [
  {
    path: "/login",
    component: Login
  },
  {
    path: "/chat",
    name:'chat',
    component: Chat
  },
  {
    path: "/Home",
    component: Home,

  },
  {
    path: "/profile",
    component: Profile
  },
  {
    path: "/register",
    component: Register
  },
  {
    path: "/discover",
    component: Discover
  },
  {
    path: "/discover/search",
    component: Search
  },
  {
    path: "/discover/search/result/:phone",
    name:"searchResult",
    component: SearchResult
  },
  {
    path: "/contact",
    component: Contact
  },
];

const router = new VueRouter({
  routes,
  mode: 'history',
});

export default router;
